home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL / glcopytexsubimage2dext.z / glcopytexsubimage2dext
Encoding:
Text File  |  2002-10-03  |  17.0 KB  |  266 lines

  1.  
  2.  
  3.  
  4. ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))     OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee     ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT - copy pixels into a 2D texture subimage
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT( GLenum _t_a_r_g_e_t,
  14.                                   GLint _l_e_v_e_l,
  15.                                   GLint _x_o_f_f_s_e_t,
  16.                                   GLint _y_o_f_f_s_e_t,
  17.                                   GLint _x,
  18.                                   GLint _y,
  19.                                   GLsizei _w_i_d_t_h,
  20.                                   GLsizei _h_e_i_g_h_t )
  21.  
  22.  
  23. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  24.      _t_a_r_g_e_t   The target texture.  Must be GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD or
  25.               GGGGLLLL____DDDDEEEETTTTAAAAIIIILLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD____SSSSGGGGIIIISSSS.
  26.  
  27.      _l_e_v_e_l    The level-of-detail number.  Level 0 is the base image level.
  28.               Level _n is the _nth mipmap reduction image.
  29.  
  30.      _x_o_f_f_s_e_t  A texel offset in the x direction within the texture array.
  31.  
  32.      _y_o_f_f_s_e_t  A texel offset in the y direction within the texture array.
  33.  
  34.      _x        The x coordinate of the lower-left corner of the pixel rectangle
  35.               to be transferred to the texture array.
  36.  
  37.      _y        The y coordinate of the lower-left corner of the pixel rectangle
  38.               to be transferred to the texture array.
  39.  
  40.      _w_i_d_t_h    The width of the texture subimage.
  41.  
  42.      _h_e_i_g_h_t   The height of the texture subimage.
  43.  
  44. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.      ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT replaces a rectangular portion of a two-
  46.      dimensional texture image with pixels from the current GGGGLLLL____RRRREEEEAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRR
  47.      (rather than from main memory, as is the case for ggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT).
  48.  
  49.      The screen-aligned pixel rectangle with lower-left corner at (_x, _y)
  50.      having width _w_i_d_t_h and height _h_e_i_g_h_t replaces the portion of the texture
  51.      array with x indices _x_o_f_f_s_e_t through _x_o_f_f_s_e_t+_w_i_d_t_h-1, inclusive, and y
  52.      indices _y_o_f_f_s_e_t through _y_o_f_f_s_e_t+_h_e_i_g_h_t-1, inclusive, at the mipmap level
  53.      specified by _l_e_v_e_l.  (But see the paragraph about GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX
  54.      below).
  55.  
  56.      The pixels in the rectangle are processed exactly as if ggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss had
  57.      been called, but the process stops just before final conversion.  At this
  58.      point all pixel component values are clamped to the range [0, 1] and then
  59.      converted to the texture's internal format for storage in the texel
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))     OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee     ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      array.
  75.  
  76.      The destination rectangle in the texture array may not include any texels
  77.      outside the texture array as it was originally specified.  It is not an
  78.      error to specify a subtexture with zero width or height, but such a
  79.      specification has no effect.
  80.  
  81.      If any of the pixels within the specified rectangle of the current
  82.      GGGGLLLL____RRRREEEEAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRR are outside the read window associated with the current
  83.      rendering context, then the values obtained for those pixels are
  84.      undefined.
  85.  
  86.      When GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____RRRREEEEAAAADDDD____IIIINNNNGGGGRRRR is enabled, every other row of the source
  87.      pixel rectangle is read.  The height of the source pixel rectangle is
  88.      equivalent to 2xheight.  Only rows (y+0,y+2,...) of the source are used
  89.      to define the rows of the texture subimage that are affected by the copy.
  90.  
  91.      When GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is enabled, source pixels are written to every
  92.      other row in the texture subimage, rather than to every successive row.
  93.      The height of the subimage is equivalent to 2xheight.  Rows
  94.      (yoffset+0,yoffset+2,...)  of the destination texture are affected, while
  95.      rows (yoffset+1,yoffset+3,...) are not modified.  A complete video frame
  96.      may be assembled in texture memory by invoking ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT on
  97.      two consecutive video fields, with _y_o_f_f_s_e_t values that differ by one.
  98.  
  99. NNNNOOOOTTTTEEEESSSS
  100.      ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is part of the EEEEXXXXTTTT____ccccooooppppyyyy____tttteeeexxxxttttuuuurrrreeee extension,
  101.      GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is part of the SSSSGGGGIIIIXXXX____iiiinnnntttteeeerrrrllllaaaacccceeee extension, and
  102.      GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____RRRREEEEAAAADDDD____IIIINNNNGGGGRRRR is part of the IIIINNNNGGGGRRRR____iiiinnnntttteeeerrrrllllaaaacccceeee____rrrreeeeaaaadddd extension.  See
  103.      ggggllllIIIInnnnttttrrrroooo for more information about using extensions.
  104.  
  105. EEEERRRRRRRROOOORRRRSSSS
  106.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated when _t_a_r_g_e_t is not one of the allowable
  107.      values.
  108.  
  109.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _l_e_v_e_l is less than zero or greater than
  110.      log (_m_a_x), where _m_a_x is the returned value of GGGGLLLL____MMMMAAAAXXXX____TTTTEEEEXXXXTTTTUUUURRRREEEE____SSSSIIIIZZZZEEEE.
  111.         2
  112.  
  113.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if xoffset<-TEXTURE_BORDER,
  114.      (xoffset+width)>(TEXTURE_WIDTH-TEXTURE_BORDER), yoffset<-TEXTURE_BORDER,
  115.      or (yoffset+interlacexheight)>(TEXTURE_HEIGHT-TEXTURE_BORDER).  Where
  116.      TEXTURE_WIDTH, TEXTURE_HEIGHT, and TEXTURE_BORDER are the state values of
  117.      the texture image being modified, and interlace is 1 if GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX
  118.      is disabled and 2 otherwise.  Note that TEXTURE_WIDTH and TEXTURE_HEIGHT
  119.      include twice the border width.
  120.  
  121.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is negative.
  122.  
  123.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated when the texture array has not been
  124.      defined by a previous ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD (or equivalent) operation.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                                                         PPPPaaaaggggeeee 2222
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))     OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee     ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  138.  
  139.  
  140.  
  141.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is executed
  142.      between the execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  143.      ggggllllEEEEnnnndddd.
  144.  
  145. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  146.      ggggllllGGGGeeeettttTTTTeeeexxxxIIIImmmmaaaaggggeeee
  147.  
  148.  
  149. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  150.      RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems do not support color
  151.      matrix transformations on images as they are loaded to or read back from
  152.      texture memory.
  153.  
  154.      RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems support
  155.      ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD and ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT with the following
  156.      restrictions:
  157.  
  158.           1.  Only level 0 is supported; other levels result in a
  159.               GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error.
  160.  
  161.           2.  The texel offsets and the dimensions of the subimage must be
  162.               multiples of 32; otherwise a GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error is
  163.               generated.
  164.  
  165.           3.  If ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD or ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is used when a
  166.               GLX video source is the read drawable (see
  167.               ggggllllXXXXMMMMaaaakkkkeeeeCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddSSSSGGGGIIII), the X offset and Y offset must both be 0
  168.               and the subimage width must be 768; otherwise a GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE
  169.               error is generated.
  170.  
  171.           4.  GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is not supported (see ggggllllEEEEnnnnaaaabbbblllleeee).
  172.  
  173.      On IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems, there is a performance benefit when the width
  174.      of the image to be transferred to texture memory is a multiple of 8.
  175.  
  176.      Texture borders are not supported on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems.
  177.      Applications should use borderless textures and GGGGLLLL____CCCCLLLLAAAAMMMMPPPP____TTTTOOOO____EEEEDDDDGGGGEEEE____SSSSGGGGIIIISSSS
  178.      wrap mode.
  179.  
  180.      On HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, if the right side of the image
  181.      to be transferred to texture memory is not the right side of the texture,
  182.      then its index must be a multiple of 32, where index = xoffset+width.
  183.      Otherwise it will generate a GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error.
  184.  
  185.      The SSSSGGGGIIIIXXXX____iiiinnnntttteeeerrrrllllaaaacccceeee extension is supported only on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy
  186.      systems, on RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, on OOOOccccttttaaaannnneeee2222
  187.      VVVVPPPPrrrroooo systems, and on OOOO2222 systems.
  188.  
  189.      The IIIINNNNGGGGRRRR____iiiinnnntttteeeerrrrllllaaaacccceeee____rrrreeeeaaaadddd extension is supported only on OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo
  190.      systems, and on OOOO2222 systems.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                                                         PPPPaaaaggggeeee 3333
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))     OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee     ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  204.  
  205.  
  206.  
  207.      On OOOO2222 systems, when the current _r_e_a_d drawable is a DM pbuffer, using
  208.      ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD or ggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT to copy into a full texture
  209.      image whose dimensions and format match those of the pbuffer causes a
  210.      copy-by-reference.  This has performance advantages, especially for
  211.      video-generated DMbuffers, because it provides a DMA path for updating
  212.      textures.  Following the copy, rendering to the pbuffer or otherwise
  213.      modifying the DMbuffer, will directly affect texture memory.  However,
  214.      this behavior is essentially an unspecified side-effect of the
  215.      implementation on OOOO2222, and cannot be used on other systems.
  216.  
  217.  
  218. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  219.      ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD, ggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT, ggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss.
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                                                                         PPPPaaaaggggeeee 4444
  263.  
  264.  
  265.  
  266.